PDA - Notifications Processor

Notifications Processor Application

The Notifications Processor Application adds support for enhanced Notifications to be sent from Workflow states

This application allows users to perform the following operations

  • Send Notifications to any combination of the following
  • M-Files Users
  • M-Files User Groups
  • Non M-Files Users / External Email Addresses
  • Define Notification Templates
  • Supports HTML tags
  • Supports Images
  • Supports Inserting Placeholders from M-Files
  • Attach associated object file(s) to the notification
  • All files
  • Filter for a specific file format
  • Notification Grouping
  • Allows multiple notifications to be combined in to a single message
  • Attach documents to notifications

Pentagon Help resources:

Pentagon Product Help

PentagonDocs Assistant

PentagonMail Assistant

Help for specific Applications: (these will open in a new browser window)

Core Script Library

DWG Processor

Extranet Uploader

Notifications Processor (you are here)

PDF Processor

Transmittals

Copyright © Pentagon Solutions Ltd. All Rights Reserved.


Prerequisites

Installation ››

Before installing the Notifications Processor Application on your M-Files Server, please ensure the prerequisites listed below have been met.

  • M-Files Server 2015.3 (11.3.4330.196) or above
  • Microsoft .NET Framework 4.6 or above (Note M-Files requires .NET 4.7.2 or above)
  • Notifications Processor Application License File
  • You will also require your SMTP connection details from local IT Support

See Also

Assignment Notifications


Installation

Installation ››

Installation of the Pentagon DOCS Notifications Processor application is completed via the M-Files Admin application as detailed below.

  • Open M-files Admin
  • Expand 'Connections to M-Files\Local Computer\Document Vaults'
  • Right click on the desired vault and choose Applications
  • Click Install and select the supplied PentagonDOCS_Notifications_Processor.mfappx

See also

Licensing

Assignment Notifications


Licensing

Installation ››

Before you can use the Notifications Processor Application, you need to install a valid license. A license file can be obtained from Pentagon and is linked to the M-Files installation via the M-Files License Serial Number (xxx-xxxxxxxx).

  • Open M-files Admin
  • Expand 'Connections to M-Files\Local Computer\Document Vaults'
  • Right click on the desired vault and choose Applications
  • Select the application PentagonDOCS.Notifications
  • Click the License button
  • Click Install License, and Browse to your supplied .lic file

  • You may need to allow the vault to restart
  • Go back into the Applications window to confirm the status now shows as 'The license is valid'


Administratation

Configuration ››

The Notifications Processor Application includes the Pentagon DOCS Administrator Utility. This can be deployed to the M-Files server and/or client PC. The application is launched using the shortcut from the Pentagon DOCS program group accessible via the Start menu.

NOTE: Users of the Administration Utility must have the Change metadata structure administrative right for the selected vault.

Configuration Tree

Under the Notifications Processor section, the configuration tree has 1 node for 'Notification Settings'

This allows Notification defaults, timeouts and email settings to be configured

The configurable items are covered in more detail in the following pages:

Notification Settings - Email Settings

Notification Settings - Template Settings

Notification Settings - Database Settings

Notification Settings - Other Settings


Email Settings

Configuration ›› Notification Settings ››

The Email settings allow the configuration of the SMTP server as well as notification processing interval.

Upon selection of this tab, you are presented with configuration options as shown below. These settings can be edited and applied using the buttons in the bottom right corner.

NOTE: Please ensure you have your SMTP server settings before proceeding.

TIP: We recommend you also configure the M-Files Notification Settings detailed in the M-Files User Guide

Email Settings - SMTP Server

SMTP Server | IP address or FQDN of the SMTP server
SMTP Server Port | Port the SMTP server operates on
Senders email address | Email address that Notifications are sent FROM this will be the address the recipient will see as the sender
SMTP server requires authentication | If your SMTP server requires authentication, this must be selected
Use encrypted connection (SSL/TLS) | If your SMTP server requires SSL, then this must be selected
Username | Username used if SMTP server requires Authentication
Password | Password used if SMTP server requires Authentication
To | This option is only used when Sending a test email using the the Send test email button
Senders display Name | Name to display in notification email in place of the email address

Email Settings - Processing Options

Interval (seconds)

Frequency in seconds that the Notifications are processed.

Changing will impact how many notifications are grouped together for before processing the notifications and sending them.


Template Settings

Configuration ›› Notification Settings ››

The Template settings allow configuration of the path where all notification templates are stored additionally a tool is provided to allow images to be encoded for inclusion in a notification template.

TIP: The Notification Templates are not included in the M-Files backup.
You may wish to move the templates to a network location that is archived by your IT systems.

Template Settings - Template Paths

Template Path

By default templates are stored in C:\ProgramData\Pentagon DOCS\Notifications\Templates\

This can be changed to a more convenient location if required by your organisation

Template Settings - Base Image Encoder

Image To encode

Images in templates can be handled in a number of ways,

this tool allows converting a JPG or PNG file to BASE64 string which can then be included in notification templates.

See Also

Template Specification


Database Settings

Configuration ›› Notification Settings ››

By default the notifications processor use SQLite for managing and storing notifications, optionally SQL server can be used instead.

Database Settings - SQL Server

These settings only apply if the SQL Server option is ticked

Server | IP address or FQDN of the SQL server
Database Name | The Default database name is Notifications this can be altered if it will conflict with existing services.
Username | Username to use for SQL Authentication
Password | Password to use for SQL Authentication
Test Connection | It is recommend to test the connection to the SQL server prior to saving any changes to the database setup.
Create Tables | If this is a new instance of SQL Server, Notification tables will need to be created before the Notifications processor can operate correctly.

Database Settings - SQLite (Default)

Database Path | By default the Database files will be stored in C:\ProgramData\Pentagon DOCS\Notifications\Database This path can altered to more convenient location if required
Test Connection | Allows checking the database connection
Create Tables | Used to recreate the database tables if required


Other Settings

Configuration ›› Notification Settings ››

By default the notifications processor use SQLite for managing and storing notifications, optionally a SQL server can be used instead.

Other Settings - Logging

These settings only apply if the SQL Server option is ticked

Log Path

The folder where the log files will be stored

By default this is C:\ProgramData\Pentagon DOCS\Notifications\Logs

Other Settings - Log clean up process

Delete Logs After | How old logs files need to be before they are deleted
Process Interval | How often the process will check for old log files to remove

Other Settings - Database clean up process

Delete Sent Notifications After | How long old 'sent' notifications are kept in the database before being deleted
Delete Failed Notifications After | How long old 'failed' or 'errored' notifications are kept in the database before being deleted
Process Interval | How often the process will check for old notifications


Send Notification to M-Files User

Using Notifications Processor ›› Script Examples ››

In this example we will use the SendUserNotification method to send a simple notification message on a workflow state change. To do this we will add code to the workflow State Actions

Example

  • Open M-Files Admin, then expand 'Connections to M-Files Servers\Local Computer\Document Vaults'
  • Expand the desired vault and select 'Workflows' node
  • Configure a simple workflow as shown below
  • Double-click the state on which you want to send the Notification (e.g. Listed for approval)
  • In the 'State Properties' dialog, select the 'Actions' tab
  • Check the 'Run Script' option, then click the 'Edit Code..' button
  • In the 'Edit VBScript code' window, add the following code

Sample VBScript

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'write details to the log

ExDOCSNotification.WriteLog ActivityID, "SendUserNotification - Example"

'call SendUserNotification

ExDOCSNotification.SendUserNotification CurrentUserID.Value, objVer, "default", CurrentUserID.Value, ActivityID


Send Group Notification

Using Notifications Processor ›› Script Examples ››

In this example we will use the SendGroupNotification method to send a notification message to a group of users on a workflow state change. To do this we will add code to the workflow State Actions

Example

  • Open M-Files Admin, then expand 'Connections to M-Files Servers\Local Computer\Document Vaults'
  • Expand the desired vault
  • Select User Groups and note down the ID of the Group you wish to send Notification to in this example it is EmailGroup, ID 101
  • Now select 'Workflows' node
  • Configure a simple workflow as shown below
  • Double-click the state on which you want to send the Notification (e.g. Listed for approval)
  • In the 'State Properties' dialog, select the 'Actions' tab
  • Check the 'Run Script' option, then click the 'Edit Code..' button
  • In the 'Edit VBScript code' window, add the following code, '101' is the group ID

Sample VBScript

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'write details to the log

ExDOCSNotification.WriteLog ActivityID, "Send Group Notification"

'send the notification

ExDOCSNotification.SendGroupNotification CurrentUserId.Value, objVer, "default",101, ActivityID


Send High Priority Notification

Using Notifications Processor ›› Script Examples ››

In this example we will use the SendNotificationEx method to send a High Priority notification message on a workflow state change. To do this we will add code to the workflow State Actions

Example

  • Open M-Files Admin, then expand 'Connections to M-Files Servers\Local Computer\Document Vaults'
  • Expand the desired vault and select 'Workflows' node
  • Configure a simple workflow as shown below
  • Double-click the state on which you want to send the Notification (e.g. Listed for approval)
  • In the 'State Properties' dialog, select the 'Actions' tab
  • Check the 'Run Script' option, then click the 'Edit Code..' button
  • In the 'Edit VBScript code' window, add the following code

Sample VBScript

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'write details to the log

ExDOCSNotification.WriteLog ActivityID, "Send High Priority Notification"

'create a list of users to send to

Dim usersOrGroups : Set usersOrGroups = CreateObject("MFilesAPI.UserOrUserGroupIDs")

Dim UserID : Set UserID = CreateObject("MFilesAPI.UserOrUserGroupID")

UserID.UserOrGroupID = 1

UserID.UserOrGroupType = 1 ' User account type

usersOrGroups.add -1,UserID 'add user Id's and group ID's to the collection

'get options Object and set our options

Dim options : Set options = ExDOCSNotification.GetNotitifcationsOptionsObject()

options.MessagePriority = "HIGH"

options.template = "default"

options.SendToUsersOrUserGroups = usersOrGroups

'send the notification

ExDOCSNotification.SendNotificationEx CurrentUserId.Value, objVer, options, ActivityID


Send a Notification to External Emails With PDF Attachments

Using Notifications Processor ›› Script Examples ››

In this example we will use the SendNotificationEx method to send a notification to an external email with an attached PDF on a workflow state change. To do this we will add code to the workflow State Actions

Example

  • Open M-Files Admin, then expand 'Connections to M-Files Servers\Local Computer\Document Vaults'
  • Expand the desired vault and select 'Workflows' node
  • Configure a simple workflow as shown below
  • Double-click the state on which you want to send the Notification (e.g. Listed for approval)
  • In the 'State Properties' dialog, select the 'Actions' tab
  • Check the 'Run Script' option, then click the 'Edit Code..' button
  • In the 'Edit VBScript code' window, add the following code

Sample VBScript

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'write details to the log

ExDOCSNotification.WriteLog ActivityID, "Send External Notification With PDF Attachments"

'create a list of external emails

Dim externalEmail : Set externalEmail = CreateObject("MFilesAPI.Strings")

externalEmail.Add -1,"exampleNotification@Pentagon.co.uk"

'get options Object and set our options

Dim options : Set options = ExDOCSNotification.GetNotitifcationsOptionsObject()

options.template = "default"

options.SendToExternalUsers = externalEmail

Options.AttachmentOptions.AttachFiles = True

Options.AttachmentOptions.AttachFilesFilter = "*"

Options.AttachmentOptions.AttachFilesIfExternal = True

Options.AttachmentOptions.AttachFilesIfMfilesUser = False

'send the notification

ExDOCSNotification.SendNotificationEx CurrentUserId.Value, objVer, options, ActivityID


SendUserNotification

Script Functions ››

Description

Send a Notification to a User ID

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendUserNotification(userID as integer, objVer as ObjVer, MessageTemplate as string, sendTo as integer, LogIdentifier As Object)

Parameters

Name | Data Type | Description
userID | integer | ID of current M-Files user
objVer | objVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
MessageTemplate | string | Name of the Template to use for the notification message
sendTo | integer | The ID of the user to send the Notification to
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'call SendUserNotification

ExDOCSNotification.SendUserNotification CurrentUserID.Value, objVer, "default", 31, ActivityID


SendExternalNotification

Script Functions ››

Description

Send a Notification to an External email address

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendExternalNotification(userID as integer, objVer as ObjVer, MessageTemplate as string, sendTo as string, LogIdentifier As Object)

Parameters

Name | Data Type | Description
userID | integer | ID of current M-Files user
objVer | objVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
MessageTemplate | string | Name of the Template to use for the notification message
sendTo | string | The Email address to send the Notification to
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'call SendExternalNotification

ExDOCSNotification.SendExternalNotification CurrentUserID.Value, objVer, "default", "exampleNotification@Pentagon.co.uk", ActivityID


SendGroupNotification

Script Functions ››

Description

Send a Notification to a User Group.

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendGroupNotification(userID as integer, objVer as ObjVer, MessageTemplate as string, userOrGroupIDs as UserOrUserGroupIDs, LogIdentifier As Object)

Parameters

Name | Data Type | Description
userID | integer | ID of current M-Files user
objVer | objVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
MessageTemplate | string | Name of the Template to use for the notification message
userOrGroupIDs | UserOrUserGroupIDs | Collection of UserIds and/or GroupIDs to send the Notification too
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'call SendGroupNotification

ExDOCSNotification.SendGroupNotification CurrentUserID.Value, objVer, "default", 101, ActivityID


SendUserOrGroupNotification

Script Functions ››

Description

Send a Notification to a collection of Users or User Groups.

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendUserOrGroupNotification(userID as integer, objVer as ObjVer, MessageTemplate as string, userOrGroupIDs as UserOrUserGroupIDs, LogIdentifier As Object)

Parameters

Name | Data Type | Description
userID | integer | ID of current M-Files user
objVer | objVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
MessageTemplate | string | Name of the Template to use for the notification message
userOrGroupIDs | UserOrUserGroupIDs | Collection of UserIds and/or GroupIDs to send the Notification too
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'create a list of users to send to

Dim usersOrGroups : Set usersOrGroups = CreateObject("MFilesAPI.UserOrUserGroupIDs")

Dim UserID: Set UserID = CreateObject("MFilesAPI.UserOrUserGroupID")

UserID.UserOrGroupID = 31

UserID.UserOrGroupType = 1 ' User account type

usersOrGroups.add -1,UserID 'add user Id's and group ID's to the collection

'call SendUserOrGroupOrExternalNotification

ExDOCSNotification.SendUserOrGroupNotification CurrentUserID.Value, objVer, "default", usersOrGroups, ActivityID


SendUserOrGroupOrExternalNotification

Script Functions ››

Description

Send a Notification to a collection of Users and/or Groups and/or External email addresses.

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendUserOrGroupOrExternalNotification(userID as integer, objVer as ObjVer, MessageTemplate as string, userOrGroupIDs as UserOrUserGroupIDs, externalEmailAddresses as Strings, LogIdentifier As Object)

Parameters

Name | Data Type | Description
userID | integer | ID of current M-Files user
objVer | objVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
MessageTemplate | string | Name of the Template to use for the notification message
userOrGroupIDs | UserOrUserGroupIDs | Collection of UserIds and/or GroupIDs to send the Notification too
externalEmailAddresses | Strings | Collection of email addresses to send the Notification too
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'create a list of users to send to

Dim usersOrGroups : Set usersOrGroups = CreateObject("MFilesAPI.UserOrUserGroupIDs")

Dim UserID: Set UserID = CreateObject("MFilesAPI.UserOrUserGroupID")

UserID.UserOrGroupID = 31

UserID.UserOrGroupType = 1 ' User account type

usersOrGroups.add -1,UserID 'add user Id's and group ID's to the collection

'create a collection of external email address

Dim externalEmail : Set externalEmail = CreateObject("MFilesAPI.Strings")

externalEmail.Add -1,"notificationsExample@Pentagon.co.uk"

'call SendUserOrGroupOrExternalNotification

ExDOCSNotification.SendUserOrGroupOrExternalNotification CurrentUserID.Value, objVer, "default", usersOrGroups, externalEmail, ActivityID


SendNotificationEx

Script Functions ››

Description

Send a Notification with additional customization of the Notifications Processor, this method allows additional customization of the Notifications Processor by passing a Options object to this method.

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub SendNotificationEx(userID as integer, objVer as ObjVer, options as Options, LogIdentifier As Object)

Parameters

Name | Data Type | Description
User Id | integer | ID of current M-Files user
objVer | ObjVer | ObjVer of the object being processed. This can be provided by the event handler or created dynamically using CreateObject("MFilesAPI,ObjVer")
Options | Options | A Settings object, used to further customize the behavior of the Notifications Processor when creating new notifications
LogIdentifier | String or TypedValue | Used to determine the filename of the log file. To create a log file for the current activity pass in the provided ActivityID. If this parameter is Nothing, then no log file is generated.

Return

None

Example

'create PentagonDOCS Notification object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'create a list of users to send to

Dim usersOrGroups : Set usersOrGroups = CreateObject("MFilesAPI.UserOrUserGroupIDs")

Dim UserID: Set UserID = CreateObject("MFilesAPI.UserOrUserGroupID")

UserID.UserOrGroupID = 31

UserID.UserOrGroupType = 1 ' User account type

usersOrGroups.add -1,UserID 'add user Id's and group ID's to the collection

'create a settings object

Dim mySettings : Set mySettings = ExDOCSNotification.GetNotificationSettingsObject()

mySettings.AttachFiles = true 'attach files from the objVer to the Notification

mySettings.template = "default" 'use the default Notification template

mySettings.SendToUsersOrUserGroups = usersOrGroups

'call sendNotificationEx

ExDOCSNotification.SendNotificationEx CurrentUserID.Value, objVer, mySettings, ActivityID


GetNotificationOptionsObject

Script Functions ››

Description

Gets an object of type Options , this allows additional Notification options to be set allowing for finer control over the Notification Processor

Syntax

Function GetNotificationOptionsObject() as Options

Parameters

None

Return

Returns an object of type Options or throws an exception

Example

'create PentagonDOCS Notifications Processor object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'get a settings object

Dim options : set options = ExDOCSNotification.GetNotificationOptionsObject()

See Also:

Options


WriteLog

Script Functions ››

Description

A Log file is generated if a LogIdentifier is provided, no log file is created if the LogIdentifier is Nothing. Please see Log Files for more information

Syntax

Sub WriteLog(LogIdentifier As Object, Message As Object)

Parameters

Name | Data Type | Description
LogIdentifier | String or TypeValue | Used to determine the filename of the log file. To create a log file for the current activity pass in provided ActivityID
Message | Object | A String or Object to write the log file. If an object is specified, it must be convertible to a String

Return

No Return value

Example

'create PentagonDOCS Notifications Processor object

Set ExDOCSNotification = GetExtensionObject("PentagonDOCS.Notifications")

'write to log

ExDOCSNotification.WriteLog ActivityID, "Log Message 1"

ExDOCSNotification.WriteLog ActivityID, "Log Message 2"

ExDOCSNotification.WriteLog ActivityID, "Log Message 3"

The resulting log file would contain the following information:

02/10/2019 22:48:48 Log Message 1

02/10/2019 22:48:48 Log Message 2

02/10/2019 22:48:48 Log Message 3


Log Files

Troubleshooting ››

Custom Log Files

The Notification Processor has the ability to generate log files during its operation. By supplying the LogIdentifer parameter to the various script functions a log file is automatically created or appended to. The LogIdentifier determines the filename of the resulting log file. Typically these would be based on the current activity or transaction, thereby creating separate log files for each event.

The log files are useful when trying to determine why a particular Notification Processor function might have failed, the WriteLog function provides the ability to include custom log entries to help debug script related issues.

The log files are created on the M-Files server the default location for log files is: C:\ProgramData\PentagonDOCS\Notifications\Logs

Server Processor Log File

In addition to custom log files the Notifications Processor will automatically log any unhanded Exceptions or errors that occur, in a situation where a LogIdentifier has not been provided to a Method the server log can provide basic details of any exception or error that may have occurred.

If there is an issue writing to any of the log files such as file/folder access then the log message will be directed to the Windows Event Log

Example Log file

Filename: {581729DD-F8A8-4C19-8108-DFB0DDFED2E8}.log

02/08/2019 17:21:10 Send External Notification

02/08/2019 17:21:10 Flattening any user groups...

02/08/2019 17:21:10 Processing Substitute Users...

02/08/2019 17:21:10 ...Substitute Users set to be ignored

02/08/2019 17:21:10 Adding external email address (if any)...

02/08/2019 17:21:10 Removing blank or invalid email addresses...

02/08/2019 17:21:10 Removing duplicate email addresses...

02/08/2019 17:21:10 Raising New Notification...

Automatic Removal of Log Files

Creation of log files can be based on an arbitrary identifier such as ActivityID or TransactionID, the number of log files can quickly accumulate. The Notifications processor will automatically remove log files older than 24 hours.

This setting can be increased or decreased via the Administration tool


Assignment Notifications

Troubleshooting ››

M-Files assignment notifications are handled by an inbuilt rule within M-Files server.

This rule cannot be influenced by normal M-Files administration, nor can the PentagonDOCS Notification Processor alter its behavior, specifically the Notifications processor is unable to Group these notifications, this may result in M-Files users receiving multiple assignment notifications.

If it is desired that assignment notifications are to be grouped together the built in assignment notification rule must be disabled by setting the following registry key:

Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Motive\M-Files\<version>\Server\MFServer

Value name: BuiltInAssignedToRuleEnabled

Value type: REG_DWORD (DWORD 32-bit Value)

Value data: 0 (Disabled)

This rule will disable built in assignment notifications for all vaults on the server


SSL Connection Failure

Troubleshooting ››

The notifications processor only supports SSL over TLS and does not support SMTP/SSL, SMTP over SSL or SMTPS, SMTP over TLS requires an insecure connection to be established to the server first the a STARTTLS command is issued to the server to switch to secure communications.


Options

Types ››

Description

The Options Object is returned from the GetNotitifcationsOptionsObject method and allows configuration of additional Notification options

Properties

Name

Data Type

Description

Default Value

SendToUserOrUserGroups

UserOrUserGroupIDs

Collection of M-Files user and/or M-Files group id's

SendToExternalUsers

Strings

List of email address to send the notification to, a list of strings with correctly formated and valid email addresses

template

String

The name of the template to use for the notification, the default template value is default

default is default options

SubstituteUsers

Integer

Indicates how to handle Substitute users when sending a notification

  • 0 = Do not send to substitute user(s) only send to the original user(s)
  • 1 = Only send to the substitute user(s)
  • 2 = Send to Original and substitute user(s)

0 is the default

Grouping

String

Identifier used to group multiple notifications together, this option allows for many notifications from many Events/Activities to be grouped together and sent as a single Notification.

the value from the template settings is used

MessagePriority

String

Sets the Email priority the following options are valid

  • LOW
  • HIGH

High Priority Emails are displayed with a red exclamation mark when viewed in Outlook

LOW

AttachmentOptions

AttachmentOptions

See AttachmentOptions below

Properties - AttachmentOptions

Name | Data Type | Description | Default Value
AttachFiles | Boolean | Indicates if the files within an Object should be attached to the Notification Email | false indicating files will not be attached
AttachFilesFilter | String | A string allowing files to be filtered when attaching | * is the default indicating all files are to be attached
AttachFilesIfMfilesUser | Boolean | A flag indicating if when sending Notifications to M-Files user ID's the files should be attached to the Notification | false indicating that MFiles users will not receive attached files
AttachFilesIfExternal | Boolean | A flag indicating if when sending Notifications to external email addresses the files should be attached to the Notification | true indicating the external users will receive attached files
ZipOptions | ZipOptions | see ZipOtions below |

Properties - ZipOptions

Name | Data Type | Description | Default Value
CompressFiles | Boolean | Indicates if an Objects files should be compressed (zipped) prior to be attached | false indicating files will not be compressed
CompressionLevel | integer | An integer indicating the level of compression to apply to the files 0 = optimal compression 1 = fastest 2 = none | default is 0 optimal compression level


Template Specification

Templates ››

The Notifications processor uses customizable templates for notification messages, these templates can be modified to match the requirements of your organization, editing the template files requires a basic understanding of HTML and CSS.

Upon installation of the Notifications processor a set of sample templates are copied to: C:\ProgramData\Pentagon Docs\Notifications\Templates

Placeholders

Notification messages can include placeholders. For example, to include the Object ID in the message add the string %OBJID% to the template in the appropriate location a complete list of available placeholders are detailed below

Placeholder | Description
CAUSEDBY | The name of the user who caused the event
CAUSEDBYACOCUNT | The account name for the user who caused the event
FILENAME | The name of the file
HYPERLINKFRAGMENTHTML | A HTML formatted hyperlink containing the URL to the object
HYPERLINKFRAGMENTPLAIN | a plain-text formatted text fragment containing the URL to the object
INTERNALID | The internal ID of the object. The inter ID is always unique for each object of a single object type and withing a single vault
MFILESURL | An M-Files URL that shows the latest version of the object in question
MFILESURLTOVERSION | An M-Files URL that shows the specific version of the object in question
MOBILEURL | An M-Files Mobile URL that shows the latest version of the object in question
MOBILEURLTOVERSION | An M-Files Mobile URL that shows the specific version of the object in question
NOTIFICATIONRULENAME | NOT SUPPORTED
OBJID | The external ID of the object
OBJTITLE | The name or title of the object
OBJTYPE | Object Type
OBJVER | Object version
ROLLEDBACKTOVERSION | The version that the object was rolled back to
TIMESTAMP | The time when the event occurred
USERCAUSEDWORKFLOWSTATE_<ID> | NOT SUPPORTED
VAULTNAME | The name of the document vault
VAULTGUID | The unique identifier (GUID) of the vault
WEBURL | An M-Files URL that shows the latest version of the object
WEBURLTOVERSION | An M-Files URL that shows the specific version of the object
PROPERTY_<ID> | The value of the specified property of the object, replace <ID> in the placeholder with the ID of the property
OLDPROPERTY_<ID> | The old value of the specified property of the object, replace <ID> in the placeholder with the ID of the property
OBJTYPE_<ID> | Values of all the properties that can refer to the specified object type, replace <ID> in the placeholder with the ID of the property

See Also

M-Files Personalizing Notification Messages


Support

Notifications Processor Application for M-Files

For support related to the installation and or usage of this Application, please contact:

Head Office
Pentagon Ltd
Design Technology Centre
8 Kinetic Crescent
Innova Business Park
Enfield, Middlesex
EN3 7XH

Pentagon Support

T: 01992 700 188
E: support@Pentagon.co.uk
www.Pentagon.co.uk